package com.molichuxing.services.infrastructure.service.impl;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.molichuxing.services.infrastructure.bean.LoginLogBean;
import com.molichuxing.services.infrastructure.dao.LoginLogMapper;
import com.molichuxing.services.infrastructure.dto.request.create.LoginLogCreateDto;
import com.molichuxing.services.infrastructure.service.LoginLogAppService;

/**
 * 
 * @author liyg
 * 用户登录日志服务实现类
 * 2019-10-14
 * 
 */
@Service("loginLogAppService")
public class LoginLogAppServiceImpl implements LoginLogAppService{

	@Autowired
	private LoginLogMapper loginLogMapper;
	
	/**
	 * 保存登录日志
	 * @param createDto
	 * @return
	 */
	@Override
	public Boolean create(LoginLogCreateDto createDto) {
		LoginLogBean bean =new LoginLogBean();
		BeanUtils.copyProperties(createDto, bean);
		int num = loginLogMapper.create(bean);
		return num == 1;
	}
}
